package com.game;

import java.util.*;

import com.card.*;
import com.user.*;

public class Dealer 
{
	private ArrayList<Player> playerList = null;
	private GameInfo dealer;
	private CardDeck cardDeck = null;
	
	public Dealer()
	{
		this.playerList = new ArrayList<Player>();
		this.dealer = new GameInfo();
		this.cardDeck = new CardDeck();
	}
	
	public void addPlayer(Player player)
	{
		this.playerList.add(player);
	}
	
	public void goBetting()
	{
		for(int i = 0, size = this.playerList.size(); i < size; i++)
		{
			this.playerList.get(i).bet();
		}
	}
	
	public void goCut()
	{
		for(int i = 0, size = this.playerList.size(); i < size; i++)
		{
			this.playerList.get(i).cut();
		}		
	}

	
	public void assignCards()
	{
		for(int i = 0, size = this.playerList.size(); i < size; i++)
		{
			this.playerList.get(i).getCardSetFrom(this.cardDeck);
		}
	}
	
	public void retrieveCards()
	{
		for(int i = 0, size = this.playerList.size(); i < size; i++)
		{
			this.playerList.get(i).retrieveCardSetTo(this.cardDeck);
		}		
	}
}